package com.swe.chums.dao;

import com.swe.chums.dao.model.CommentLike;
import com.swe.chums.dao.model.CommentLikePk;
import com.swe.chums.dao.exceptions.CommentLikeDaoException;
import java.util.List;

public interface CommentLikeDao
{
	/**
	 * Method 'insert'
	 * 
	 * @param dto
	 * @return CommentLikePk
	 */
	public CommentLikePk insert(CommentLike dto);

	/** 
	 * Updates a single row in the comment_like table.
	 */
	public void update(CommentLikePk pk, CommentLike dto) throws CommentLikeDaoException;

	/** 
	 * Deletes a single row in the comment_like table.
	 */
	public void delete(CommentLikePk pk) throws CommentLikeDaoException;

	/** 
	 * Returns all rows from the comment_like table that match the criteria 'id = :id'.
	 */
	public CommentLike findByPrimaryKey(int id) throws CommentLikeDaoException;

	/** 
	 * Returns all rows from the comment_like table that match the criteria ''.
	 */
	public List<CommentLike> findAll() throws CommentLikeDaoException;

	/** 
	 * Returns all rows from the comment_like table that match the criteria 'comment_id = :commentId'.
	 */
	public List<CommentLike> findByComment(int commentId) throws CommentLikeDaoException;

	/** 
	 * Returns all rows from the comment_like table that match the criteria 'user_id = :userId'.
	 */
	public List<CommentLike> findByUser(int userId) throws CommentLikeDaoException;

	/** 
	 * Returns all rows from the comment_like table that match the criteria 'id = :id'.
	 */
	public List<CommentLike> findWhereIdEquals(int id) throws CommentLikeDaoException;

	/** 
	 * Returns all rows from the comment_like table that match the criteria 'comment_id = :commentId'.
	 */
	public List<CommentLike> findWhereCommentIdEquals(int commentId) throws CommentLikeDaoException;

	/** 
	 * Returns all rows from the comment_like table that match the criteria 'user_id = :userId'.
	 */
	public List<CommentLike> findWhereUserIdEquals(int userId) throws CommentLikeDaoException;

	/** 
	 * Returns the rows from the comment_like table that matches the specified primary-key value.
	 */
	public CommentLike findByPrimaryKey(CommentLikePk pk) throws CommentLikeDaoException;
        
        public int getLikeCount(int commentID) throws CommentLikeDaoException;
        
        public int getUserLikeCountForComment(int userID, int commentID) throws CommentLikeDaoException;

        public List<CommentLike> findWhereCommentIdAndUserIdEquals(int userID, int commentID) throws CommentLikeDaoException;
}
